package com.gitee.xhs.iterateStream;

import com.gitee.xhs.dao.IterateTransaction;
import com.gitee.xhs.sampleRecod.transactionRecord.Transaction;
import org.apache.flink.api.common.functions.MapFunction;

/**
 * @author BigHead
 * @date 2022/7/19 17:24
 * @description OperatorIterateMap
 */
public class OperatorIterateToIterateTransactionMap implements MapFunction<Transaction, IterateTransaction> {
    @Override
    public IterateTransaction map(Transaction value) throws Exception {
        IterateTransaction iterateTransaction = new IterateTransaction();
        iterateTransaction.setIterateLoopTimes(0);
        iterateTransaction.setTransaction(value);
        return iterateTransaction;
    }
}
